<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>es6 对象简化写法</title>
</head>
<body>
<script>
  //ES6 允许在大括号里面，直接写入变量和函数，作为对象的属性和方法
  //书写更加简洁
  let name = 'mask';
  let change = function (){
    console.log("we can change you");
  }
  const school = {
    name,
    change,
    improve(){
      console.log("we can improve you skill");
    }
  }
  console.log(school);

</script>
</body>
</html>